
/* $Header: hpib.h,v 2.2 01/10/02 10:30:24 przybyls Exp $ */


/***********************************************************************/
/* INCLUDE FILE NAME: hpib.h                                           */
/* ==================                                                  */
/*                                                                     */
/* Author:  Bob Cook                                                   */
/*                                                                     */
/* COMMENT:                                                            */
/*          Include file for files using the services of HPIB.         */
/*                                                                     */
/*                                                                     */
/*                                                                     */
/***********************************************************************/

#ifndef HPIB_H
#define HPIB_H

/*****************************/
/*   IFDEFS                  */
/*****************************/


/*****************************/
/*   SYMBOLIC CONSTANTS      */
/*****************************/



/*  defines for serial poll status register */
#define  SP_MSG_AV      (U_INT8)0x10    /* used to set message available bit */
#define  SP_SET_SRQ     (U_INT8)0x40    /* used to set SRQ bit */
#define  SP_CLEAR       (U_INT8)0x00    /* used to clear bits in SP register */

/*  defines for parallel poll  */
#define  PPC_CMD          (U_INT8)0x05   /* PP configure command */
#define  PPD_CMD          (U_INT8)0x70   /* PP disable command */
#define  PPU_CMD          (U_INT8)0x15   /* PP unconfigure command */

#define  PP_CLEAR         (U_INT8)0x00   /* used to clear PP register */
#define  PP_SRV_REQ       (U_INT8)0xFF   /* set PP_Serv_Stat-service needed */
#define  PP_SRV_NOT_REQ   (U_INT8)0x00   /*set PP_Serv_Stat-service not needed*/

/*****************************/
/*   MACROS                  */
/*****************************/


/*****************************/
/*   TYPEDEFS                */
/*****************************/




/*****************************/
/*   FUNCTION PROTOTYPES     */
/*****************************/

/*  model for SysCode */
#ifndef mccabe
#pragma SECTION PROG=SysCode
#endif 
void HandleUNC(void);
void HpibISR(void);
void HpibIsrNoDma(void);
#ifndef mccabe
#pragma SECTION UNDO
#endif 


/* put SetUpHpibRdPacket() in prog area */
void SetUpHpibRdPacket(void);
DIAG_RESULT HpibPowerOnTest(void);

/* put InitializeHpib() in boot area */
#ifndef mccabe
#pragma SECTION PROG=boot
#endif 
void  InitializeHpib(void);
void  TurnOnHpib(void);
#ifndef mccabe
#pragma SECTION UNDO
#endif 


#endif
